package com.atguigu.srb.sms.client;

import com.atguigu.srb.sms.client.fallback.CoreUserInfoClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 远程Core服务接口
 * @author gcq
 * @Create 2021-05-02
 */
@FeignClient(value = "service-core", fallback = CoreUserInfoClientFallBack.class)
public interface CoreUserInfoClient {

    /**
     * 校验手机号是否已注册
     * @param mobile 手机号
     * @return true 已注册 false 未注册
     */
    @GetMapping("/api/core/userInfo/checkMobile/{mobile}")
    public boolean checkMobile(@PathVariable("mobile") String mobile);
}